﻿using UnityEngine;
using System.Collections;

public enum WhichChess : byte {
    NONE = 0,
    // 8-13是红方，16-22是黑方
    // 士，象，炮，将，马，兵，车
    BA = 17, BB = 18, BC = 21, BK = 16, BN = 19, BP = 22, BR = 20,  //黑方
    RA = 9, RB = 10, RC = 13, RK = 8, RN = 11, RP = 14, RR = 12,    //红方
}
public enum RedBlackSide : byte {
    RED = 8,
    BLACK = 16,
}

/// <summary>
/// 棋子数据模型
/// </summary>
//public class ChessModel {

//    /// <summary>
//    /// 哪颗棋子
//    /// </summary>
//    public WhichChess whichChess { get; private set; }
//    /// <summary>
//    /// 红方：8，黑方：16
//    /// </summary>
//    public RedBlackSide whichPlayer { get; private set; }

//    public ChessModel ( ) { }
//    public ChessModel (WhichChess whichChess) {
//        SetWhichChess(whichChess);
//        SetChessWhichPlayer( );
//    }

//    private void SetWhichChess (WhichChess whichChess) {
//        this.whichChess = whichChess;
//    }
//    private void SetChessWhichPlayer ( ) {
//        const byte side = 16;
//        if ((byte)(this.whichChess) < side) {
//            this.whichPlayer = RedBlackSide.RED;
//        } else {
//            this.whichPlayer = RedBlackSide.BLACK;
//        }
//    }

//}
